package com.proj.entity;

// Generated 2014-11-26 14:22:32 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.proj.annotation.IndexField;

/**
 * Question generated by hbm2java
 */
@Entity
@Table(name = "question", catalog = "webhr")
@IndexField(fieldName="table",fieldValue="question",type=1,indexed=true,stored=true,storeTermVectorOffsets=false,storeTermVectors=false,storeTermVectorPositions=false,tokenized=false)
public class Question implements java.io.Serializable {

	private String questionId;
	private String topicName;
	private String userId;
	private String questionName;
	private String questionDesc;
	private String image;
	private Integer answerTime;
	private Integer attentionTime;
	private Integer browseTime;
	private Date createTime;
	private String answerLabel;
	private Date lastMotify;
	private Set<AttentionQuestion> attentionQuestions = new HashSet<AttentionQuestion>(0);
	private Set<Answer> answers = new HashSet<Answer>(0);
	private Set<QuestionTopic> questionTopics = new HashSet<QuestionTopic>(0);

	public Question() {
	}

	public Question(String questionId, Date createTime) {
		this.questionId = questionId;
		this.createTime = createTime;
	}

	public Question(String questionId, String topicName, String userId,
			String questionName, String questionDesc, String image,
			Integer answerTime, Integer attentionTime, Integer browseTime,
			Date createTime, String answerLabel, Set attentionQuestions,
			Set answers, Set questionTopics) {
		this.questionId = questionId;
		this.topicName = topicName;
		this.userId = userId;
		this.questionName = questionName;
		this.questionDesc = questionDesc;
		this.image = image;
		this.answerTime = answerTime;
		this.attentionTime = attentionTime;
		this.browseTime = browseTime;
		this.createTime = createTime;
		this.answerLabel = answerLabel;
		this.attentionQuestions = attentionQuestions;
		this.answers = answers;
		this.questionTopics = questionTopics;
	}

	@Id
	@Column(name = "question_id", unique = true, nullable = false, length = 100)
	@IndexField(fieldName="id",indexed=true,stored=true,storeTermVectorOffsets=false,storeTermVectors=false,storeTermVectorPositions=false,tokenized=false)
	public String getQuestionId() {
		return this.questionId;
	}

	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}

	@Column(name = "topic_name", length = 100)
	public String getTopicName() {
		return this.topicName;
	}

	public void setTopicName(String topicName) {
		this.topicName = topicName;
	}

	@Column(name = "user_id", length = 50)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "question_name", length = 100)
	@IndexField(fieldName="title")
	public String getQuestionName() {
		return this.questionName;
	}

	public void setQuestionName(String questionName) {
		this.questionName = questionName;
	}

	@Column(name = "question_desc", length = 3000)
	@IndexField()
	public String getQuestionDesc() {
		return this.questionDesc;
	}

	public void setQuestionDesc(String questionDesc) {
		this.questionDesc = questionDesc;
	}

	@Column(name = "image", length = 100)
	public String getImage() {
		return this.image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	@Column(name = "answer_time")
	public Integer getAnswerTime() {
		return this.answerTime;
	}

	public void setAnswerTime(Integer answerTime) {
		this.answerTime = answerTime;
	}

	@Column(name = "attention_time")
	public Integer getAttentionTime() {
		return this.attentionTime;
	}

	public void setAttentionTime(Integer attentionTime) {
		this.attentionTime = attentionTime;
	}

	@Column(name = "browse_time")
	public Integer getBrowseTime() {
		return this.browseTime;
	}

	public void setBrowseTime(Integer browseTime) {
		this.browseTime = browseTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "answer_label", length = 100)
	public String getAnswerLabel() {
		return this.answerLabel;
	}

	public void setAnswerLabel(String answerLabel) {
		this.answerLabel = answerLabel;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_motify", nullable = true, length = 19)
	public Date getLastMotify() {
		return lastMotify;
	}

	
	public void setLastMotify(Date lastMotify) {
		this.lastMotify = lastMotify;
	}

	

}
